#ifndef GUITEST_H
#define GUITEST_H

#include "test_common.h"


class CPlayer : public GLRagdoll
{
public:
    CPlayer(GLObject* obj) : GLRagdoll(obj) { }
    virtual void onUpdate(float dt);
    void initAnims(RagdollAnimation *panims);
    void setAction(int act);
    inline int getAction() const { return cur_anim; }
private:
    RagdollAnimation *anims;
    int next_anim;
    int cur_anim;
};

class Oreol : public GLBehavior
{
public:
    Oreol(GLObject* obj) : GLBehavior(obj) { }
    virtual void onRender()
    {
        glDrawCircle(1, Color::Yellow);
    }
};


class RDATest : public GLClient
{
public:
	RDATest(GLEngine* engine);
	virtual ~RDATest();

	virtual void onEnter();
	virtual void onLeave();
	virtual void onEvent(GLEvent e);
	virtual void onUpdate(float dt);
	virtual void onDraw();

private:
    GLScene *scene;
    GLCamera camera;
    CPlayer *player;
    RagdollAnimation anims[10];
};


#endif // GUITEST_H
